﻿@*<div class="fileinput fileinput-new" data-provides="fileinput">
        <span class="btn btn-default btn-file"><span class="fileinput-new">Select file</span><span class="fileinput-exists">Select file</span><input type="file" name="..."></span>
        <span class="fileinput-filename"></span>
        <a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">&times;</a>
    </div>
    @section scripts{
        <script>
            $(function () {
                $('.fileinput').fileinput();
            });
        </script>
    }*@

<a href="#" class="btn btn-default" data-toggle="modal" data-target="#myModal">Upload files</a>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Share directory {Name}</h4>
            </div>
            <div class="modal-body">
                @*@using (Ajax.BeginForm(null, null, FormMethod.Post, new AjaxOptions { InsertionMode = InsertionMode.InsertAfter, HttpMethod = "POST", UpdateTargetId = "listoffiles" }, new { enctype = "multipart/form-data" }))
                    {*@
                <form action="/api/upload" enctype="multipart/form-data">
                    <div class="fileupload-buttonbar ">
                        <div class="col-md-12">
                            <div style="padding-bottom:5px;">
                                <input type="file" id="fileupload" name="files[]" multiple="multiple">
                            </div>
                            <div class="progress">
                                <div class="progress-bar" id="overallbar" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
                                </div>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>

                        <div class="col-md-12">
                            <div class="well hide" id="filelistholder">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                @*<button type="submit" id="upload" class="btn btn-default" data-dismiss="modal">Upload</button>*@
                <button id="btnUploadAll" class="btn btn-success" type="button">Upload All</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
